//============================================================================
// Name        : Found.h
// Author      : Anthea Neums, Jonas Halbach
//			   :
// Description : This is the Interface of the Class Found which is used to
//				 store the positions where the pattern and the genom match.
//============================================================================

#ifndef FOUND_H_
#define FOUND_H_

#include <iostream>
#include <string.h>
#include "stdafx.h"
namespace algorithm {

class Found {
public:
	Found(int genomPosition, int patternPosition, int matchingLength, char *string);
	virtual ~Found();
	
	//Getter and Setter
	int getGenomPosition();
	int getPatternPosition();
	int getMatchingLength();
	char *getString();
	void setGenomPosition(int genomPosition);
	void setPatternPosition(int patternPosition);
	void setMatchingLength(int matchingLength);
	void setString(char *string);


	//Print a found. Mainly for debugging issues.
	void print();

	//Comparing operators
	bool operator == (const Found *found);
	bool operator != (const Found *found);
	bool operator == (const Found found);
	bool operator != (const Found found);

/**
 * This Method prooves if the pattern and the genom are matching over the specified bounds.
 * @param genomPosition 	: one Position of the genom, where the pattern and the genom match
 * @param patternPosition 	: one Position in the pattern, where genom and Pattern match.
 * @param n 				: is the minimal length of matching chars in the genom and pattern.
 * @return					: An pointer to a Found-object which stores the information about the
 * 								founded match.
 */
bool contains(Found *oldFound);

private:
	int patternPosition;
	int genomPosition;
	int matchingLength;
	char *string;
};

} /* namespace algorithm */
#endif /* FOUND_H_ */
